﻿create function [Table].[HasIdentity] ( @p_TableName varchar(500) )
returns bit as
begin

  if ( select ObjectProperty( Object_Id( @p_TableName ), 'TableHasIdentity' ) ) > 0
  begin
     return 1;
  end

  return 0;

end